package com.versa.omp;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

/**
 * Created by huyaonan on 17/3/24.
 */
public class TestActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.preload).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new Versa(TestActivity.this).destroyArcade(1000);
            }
        });

        findViewById(R.id.multithread).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                for(int i=0; i<8; i++) {
                    new Thread(new Runnable() {
                        @Override
                        public void run() {
                            for(int i=0; i<100000000; i++) {
                                System.out.println("------" + Thread.currentThread().getName() + "--" + i);
                            }
                        }
                    }).start();
                }
            }
        });
    }
}
